#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<bitset>
#include<vector>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#define rep(i,a,b) for(register int i = (a);i <= (b);++i)
#define per(i,a,b) for(register int i = (a);i >= (b);--i) 
#define mkp std::make_pair
typedef long long ll;
typedef unsigned long long ull;
using std::string;using std::cin;using std::cout;
inline bool cmp(int x,int y){return x < y;}

const int N = 1e6+9;
const int inf = 1e9+9;
const double eps = 1e-7;
int _,n,l,pl,pr;
double ans,a[2*N];
struct node{
    double v,p;
}u,v;

inline void doo(){
    double dis_u = a[pl] - u.p;
    double dis_v = v.p - a[pr];
    double t_u = dis_u / u.v;
    double t_v = dis_v / v.v;
    if(t_u < t_v){
        ans += t_u , u.p = a[pl++] , u.v+=1.0 , v.p = v.p - v.v * t_u;
    } else if(t_u > t_v){
        ans += t_v , v.p = a[pr--] , v.v+=1.0 , u.p = u.p + u.v * t_v;
    } else {
        ans += t_u , u.p = a[pl++] , u.v+=1.0 , v.p = a[pr--] , ++v.v;
    }
    return;
}

int main(){
    std::ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    #ifdef LOCAL //use "g++ xxx.cpp -DLOCAL"
        freopen("in.in", "r", stdin);
    #endif
    cin >> _;
    while(_--){
        ans = 0;
        cin >> n >> l;
        rep(i,1,n) cin >> a[i];
        u.p = 0 , u.v = v.v = pl = 1 , v.p = l , pr = n;
        while(pl <= pr){
            // cout << "now in " << _ << " and pl = " << pl << " , pr = " << pr << "\n";
            // cout << "u in " << u.p << "  , v in " <<  v.p << "\n";
            // cout << "u sp " << u.v << "  , v sp " <<  v.v << "\n";
            doo();
        }
        ans += (v.p - u.p) / (u.v + v.v);
        // cout << "now in " << _ << " and pl = " << pl << " , pr = " << pr << "\n";
        // cout << "u in " << u.p << "  , v in " <<  v.p << "\n";
        // cout << "u sp " << u.v << "  , v sp " <<  v.v << "\n";
        printf("%.15lf\n",ans);
        // cout << ans << "\n";
    }

    return 0;
}